<template>
  <van-tabbar v-model="active" route>
    <van-tabbar-item replace to="/layout/home" icon="home-o">首页</van-tabbar-item>
    <van-tabbar-item replace to="/layout/cart" icon="shopping-cart-o">购物车</van-tabbar-item>
  </van-tabbar>
</template>

<script>
export default {
  data() {
    return {
      active: 0,
    }
  },
}
</script>

<style lang="scss" scoped>
.footer-bar {
  width: 100%;
  height: 100%;
  display: flex;
  a {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: red;
    }
  }
}
</style>
